From: Ivan Molodetskikh Date: Tue, 5 Jan 2021 13:40:15 +0000 (+0300) Subject: st/texture-cache: Make key g_autofree X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~645 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e73204b9fae1970fc1a4683f6f609edce69af275;p=gnome-shell.git st/texture-cache: Make key g_autofree Part-of: --- diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c index ac4db8f86..744acd509 100644 --- a/src/st/st-texture-cache.c +++ b/src/st/st-texture-cache.c @@ -971,7 +971,7 @@ st_texture_cache_load_gicon (StTextureCache *cache, ClutterActor *actor; gint scale; char *gicon_string; - char *key; + g_autofree char *key = NULL; float actor_size; GtkIconTheme *theme; GtkIconInfo *info; @@ -1050,7 +1050,6 @@ st_texture_cache_load_gicon (StTextureCache *cache, { /* If there's an outstanding request, we've just added ourselves to it */ g_object_unref (info); - g_free (key); } else { @@ -1058,7 +1057,7 @@ st_texture_cache_load_gicon (StTextureCache *cache, request->cache = cache; /* Transfer ownership of key */ - request->key = key; + request->key = g_steal_pointer (&key); request->policy = policy; request->colors = colors ? st_icon_colors_ref (colors) : NULL; request->icon_info = info;